# 使用openjdk的镜像，alpine构建的镜像比较小
FROM openjdk:8-alpine

# 设置维护者
MAINTAINER dataxgroup

# 安装python命令
RUN apk add python2


ENV TZ=Asia/Shanghai
# RUN sed -e 's/dl-cdn[.]alpinelinux.org/nl.alpinelinux.org/g' -i~ /etc/apk/repositories
RUN echo "http://mirrors.aliyun.com/alpine/v3.4/main/" > /etc/apk/repositories \
    && apk --no-cache add tzdata zeromq \
    && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
    && echo '$TZ' > /etc/timezone
#WORKDIR  /datax-web
# 添加并解压datax文件到
COPY datax-admin-*.jar  /

#分离外部配置
COPY application*.yml  /backup/

##启动脚本
COPY entrypoint.sh  /usr/local/bin/entrypoint.sh

RUN chmod 755 /usr/local/bin/entrypoint.sh

#暴露端口
EXPOSE 20080

ENTRYPOINT ["entrypoint.sh"]





